package com.xc.utils.stock;

import lombok.extern.slf4j.Slf4j;

import java.util.Calendar;

/**
 * @author xiongcan
 * @version 1.0
 * @date 2018/10/25 下午6:18
 */
@Slf4j
public class WithDrawUtils {


    //  检查当前时间是不是在出金时间内
    public static boolean checkIsWithTime(int beginTime,int endTime){

        Calendar c = Calendar.getInstance();
        int currentHour = c.get(Calendar.HOUR_OF_DAY);
        log.info("当前小时 = {}",currentHour);

        if(currentHour >= beginTime && currentHour < endTime){
            return true;
        }else{
            return false;
        }

    }


    public static void main(String[] args) {
        System.out.println(checkIsWithTime(19,20));
    }
}
